<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class EatEveryDayPrize extends Model{

    protected $table = 'eat_every_day_prize';
    public $timestamps = false;

    public function EatEveryDayPrize(){
        return \DB::table($this->table)
            ->leftjoin('users','eat_every_day_prize.uid','=','users.id')
            ->select('eat_every_day_prize.id','eat_every_day_prize.name','eat_every_day_prize.producing_area','eat_every_day_prize.show_title','users.nick_name','eat_every_day_prize.img_url','eat_every_day_prize.unit','eat_every_day_prize.status','eat_every_day_prize.grade','eat_every_day_prize.redeem_code','eat_every_day_prize.stock_num')
            ->whereNull('eat_every_day_prize.deleted_at')
            ->get();
    }}
